<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>vaeThink</title>
  {include file="../common/header"}
</head>
<body class="vae-body">

<form class="layui-form vae-content">

  <div class="layui-form-item">
    <label class="layui-form-label">标题</label>
    <div class="layui-input-block" style="max-width: 500px;">
      <input type="text" lay-verify="required" autocomplete="off" placeholder="标题" name="title" class="layui-input" value="{$info.title}">
    </div>
  </div>
  <div class="layui-form-item" pane="">
    <label class="layui-form-label">类别</label>
    <div class="layui-input-block">
      <input type="radio" name="type" value="1" title="Excel" {if $info.type==1} checked=""{/if}>
      <input type="radio" name="type" value="2" title="区域"  {if $info.type==2} checked=""{/if}>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">权限</label>
    <div class="layui-input-block" style="max-width: 500px;">
      <input type="text" lay-verify="required" autocomplete="off" placeholder="Excel权限序列号" class="layui-input" name="eid" value="{$info.eid}">
    </div>
  </div>

  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">备注</label>
    <div class="layui-input-block" style="max-width: 600px;">
      <textarea name="remark" placeholder="请输入备注" class="layui-textarea">{$info.remark}</textarea>
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <input type="hidden" name="id" value="{$info.id}" />
      <button class="layui-btn" lay-submit="" lay-filter="vaeform">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
{include file="../common/footer"}
<script>
layui.config({
    base: '/themes/admin_themes/module/'
}).use(['upload','form','vaeyo'], function(){
  var form = layui.form
  ,layer = layui.layer
  ,$ = layui.$
  ,upload = layui.upload
  ,vae = layui.vaeyo;
  
  //监听提交
  form.on('submit(vaeform)', function(data){
    $.ajax({
      url:"{:url('AirlinesAuth/editData')}",
      type:'post',
      data:data.field,
      success:function(e){
        if(e.code==1){
          layer.confirm('保存成功,返回列表页吗?', {icon: 3, title:'提示'}, function(index){
            vae.backThisTab();
            layer.close(index);
          });
        }else{
          layer.msg(e.msg);
        }
      }
    })
    return false;
  });
  
});
</script>

</body>
</html>